function objectToQueryString(obj) {
  const parts = [];

  for (const key in obj) {
    if (obj.hasOwnProperty(key)) {
      const value = obj[key];

      if (value !== undefined) {
        const encodedKey = encodeURIComponent(key);
        const encodedValue = encodeURIComponent(value);
        parts.push(`${encodedKey}=${encodedValue}`);
      }
    }
  }

  return parts.join('&');
}

const inputObject = {
  "type": "trading-type",
  "openConvert": false,
  "keyword": "",
  "siteCode": "44",
  "secondType": "A",
  "tradingProcess": "",
  "thirdType": "[]",
  "projectType": "",
  "publishStartTime": "",
  "publishEndTime": "",
  "pageNo": 1,
  "pageSize": 10
};

const queryString = objectToQueryString(inputObject);

console.log(queryString);
